import React, { PureComponent } from 'react';
import { Card, Button } from 'antd';
import { connect } from 'dva';
import PageHeaderWrapper from '@/components/PageHeaderWrapper';
// import classNames from 'classnames';
// import styles from './Log.less'

@connect(({ test01, loading }) => ({
  test01,
  loading: loading.effects['test01/init'],
}))
class Test01 extends PureComponent {
  state = {
    text: '啦啦啦啦测试',
  };

  render() {
    const { dispatch, test01: { test } } = this.props
    const { text } = this.state;
    return (
      <PageHeaderWrapper title="基础">
        <Card bordered={false}>
          {text}
          <Button type="primary" onClick={() => dispatch({ type: 'test01/save', payload: { test: (test + 1) } })}>Primary</Button>
        </Card>
        <div>{test}</div>
      </PageHeaderWrapper>
    );
  }
}

export default Test01;
